package joc.systemtest.config;

import joc.customize.Contract;
import joc.customize.ForFieldEvaluateAtBeginningOfAllMethods;
import joc.customize.ForFieldEvaluateAtEndOfAllBehaviors;
import joc.customize.ForMethodEvaluateAtEndOfMethodWithReturnValueAndInherit;
import joc.customize.ForParameterEvaluateAtBeginningOfBehavior;
import joc.customize.PartialEvaluationResult;

public class CustomGreaterThanLongContract extends Contract<CustomGreaterThanLong> {
	@ForFieldEvaluateAtBeginningOfAllMethods
	@ForFieldEvaluateAtEndOfAllBehaviors
	@ForParameterEvaluateAtBeginningOfBehavior
	@ForMethodEvaluateAtEndOfMethodWithReturnValueAndInherit
	public PartialEvaluationResult checkContract(CustomGreaterThanLong annotation, long value) {
		return getResult(value > annotation.value(), "Value " + value + " is not greater than " + annotation.value()
				+ ".");
	}
}
